From 11443ba1dc97dd25ce5d71a9e9230bdff7ed45f4 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Sun, 8 Aug 2004 19:11:16 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.11 (41167ad4Yx3OUTmkAYwUL5rDLiIUbA) It is safe for inter-dom event channels to still be bound during suspend. Normal driver restart mechanisms will clean things up during resume. --- linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c b/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c index 572732efda..057bd8ab48 100644 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c @@ -380,7 +380,7 @@ static struct irqaction misdirect_action = { void irq_suspend(void) { - int virq, irq, evtchn; + int pirq, virq, irq, evtchn; /* Unbind VIRQs from event channels. */ for ( virq = 0; virq < NR_VIRQS; virq++ ) @@ -394,16 +394,13 @@ void irq_suspend(void) irq_to_evtchn[irq] = -1; } - /* - * We should now be unbound from all event channels. Stale bindings to - * PIRQs and/or inter-domain event channels will cause us to barf here. - */ - for ( evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++ ) - if ( evtchn_to_irq[evtchn] != -1 ) - panic("Suspend attempted while bound to evtchn %d.\n", evtchn); + /* Check that no PIRQs are still bound. */ + for ( pirq = 0; pirq < NR_PIRQS; pirq++ ) + if ( (evtchn = irq_to_evtchn[pirq_to_irq(pirq)]) != -1 ) + panic("Suspend attempted while PIRQ %d bound to evtchn %d.\n", + pirq, evtchn); } - void irq_resume(void) { evtchn_op_t op; -- 2.30.2